package com.xsh.gls.controller;

import com.xsh.gls.pojo.User;
import com.xsh.gls.utils.RedisUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("/gls")
public class GlsController {
    @Autowired
    private RedisUtils redisUtils;
    @RequestMapping("/index")
    public User index(HttpServletRequest request){
        User user=(User) request.getAttribute("user");
        System.out.println(user);
        return user;
    }

}
